home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / DJGPP / BNU22DC.ZIP / docs / binutils / binutils.inf (.txt) < prev    next >
GNU Info File  |  1993-08-29  |  34KB  |  679 lines

  1. This is Info file binutils.info, produced by Makeinfo-1.52 from the
  2. input file ./binutils.texi.
  3. START-INFO-DIR-ENTRY
  4. * Binutils: (binutils).        The GNU binary utilities "ar", "ld", "objcopy",
  5.                 "objdump", "nm", "size", "strip", and "ranlib".
  6. END-INFO-DIR-ENTRY
  7.    Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
  8.    Permission is granted to make and distribute verbatim copies of this
  9. manual provided the copyright notice and this permission notice are
  10. preserved on all copies.
  11.    Permission is granted to copy and distribute modified versions of
  12. this manual under the conditions for verbatim copying, provided also
  13. that the entire resulting derived work is distributed under the terms
  14. of a permission notice identical to this one.
  15.    Permission is granted to copy and distribute translations of this
  16. manual into another language, under the above conditions for modified
  17. versions.
  18. File: binutils.info,  Node: Top,  Next: ar,  Prev: (dir),  Up: (dir)
  19. Introduction
  20. ************
  21.    This brief manual contains preliminary documentation for the GNU
  22. binary utilities (collectively version 2.2):
  23. * Menu:
  24. * ar::                          Create, modify, and extract from archives
  25. * objcopy::            Copy and translate object files
  26. * ld:(ld)Overview.              Combine object and archive files
  27. * nm::                          List symbols from object files
  28. * objdump::                     Display information from object files
  29. * ranlib::                      Generate index to archive contents
  30. * size::                        List section sizes and total size
  31. * strip::                       Discard symbols
  32. * cppfilt::            Filter to demangle encoded C++ symbols
  33. * Index::
  34. File: binutils.info,  Node: ar,  Next: objcopy,  Prev: Top,  Up: Top
  35.      ar [-]PMOD [ MEMBERNAME ] ARCHIVE FILE...
  36.      ar -M [ <mri-script ]
  37.    The GNU `ar' program creates, modifies, and extracts from archives.
  38. An "archive" is a single file holding a collection of other files in a
  39. structure that makes it possible to retrieve the original individual
  40. files (called "members" of the archive).
  41.    The original files' contents, mode (permissions), timestamp, owner,
  42. and group are preserved in the archive, and can be restored on
  43. extraction.
  44.    GNU `ar' can maintain archives whose members have names of any
  45. length; however, depending on how `ar' is configured on your system, a
  46. limit on member-name length may be imposed for compatibility with
  47. archive formats maintained with other tools.  If it exists, the limit
  48. is often 15 characters (typical of formats related to a.out) or 16
  49. characters (typical of formats related to coff).
  50.    `ar' is considered a binary utility because archives of this sort
  51. are most often used as "libraries" holding commonly needed subroutines.
  52.    `ar' creates an index to the symbols defined in relocatable object
  53. modules in the archive when you specify the modifier `s'.  Once
  54. created, this index is updated in the archive whenever `ar' makes a
  55. change to its contents (save for the `q' update operation).  An archive
  56. with such an index speeds up linking to the library, and allows
  57. routines in the library to call each other without regard to their
  58. placement in the archive.
  59.    You may use `nm -s' or `nm --print-armap' to list this index table.
  60. If an archive lacks the table, another form of `ar' called `ranlib' can
  61. be used to add just the table.
  62.    GNU `ar' is designed to be compatible with two different facilities.
  63. You can control its activity using command-line options, like the
  64. different varieties of `ar' on Unix systems; or, if you specify the
  65. single command-line option `-M', you can control it with a script
  66. supplied via standard input, like the MRI "librarian" program.
  67. * Menu:
  68. * ar-cmdline::                  Controlling `ar' on the command line
  69. * ar-scripts::                  Controlling `ar' with a script
  70. File: binutils.info,  Node: ar-cmdline,  Next: ar-scripts,  Prev: ar,  Up: ar
  71. Controlling `ar' on the command line
  72. ====================================
  73.      ar [-]PMOD [ MEMBERNAME ] ARCHIVE FILE...
  74.    When you use `ar' in the Unix style, `ar' insists on at least two
  75. arguments to execute: one keyletter specifying the *operation*
  76. (optionally accompanied by other keyletters specifying *modifiers*),
  77. and the archive name to act on.
  78.    Most operations can also accept further FILE arguments, specifying
  79. particular files to operate on.
  80.    GNU `ar' allows you to mix the operation code P and modifier flags
  81. MOD in any order, within the first command-line argument.
  82.    If you wish, you may begin the first command-line argument with a
  83. dash.
  84.    The P keyletter specifies what operation to execute; it may be any
  85. of the following, but you must specify only one of them:
  86.      *Delete* modules from the archive.  Specify the names of modules to
  87.      be deleted as FILE...; the archive is untouched if you specify no
  88.      files to delete.
  89.      If you specify the `v' modifier, `ar' lists each module as it is
  90.      deleted.
  91.      Use this operation to *move* members in an archive.
  92.      The ordering of members in an archive can make a difference in how
  93.      programs are linked using the library, if a symbol is defined in
  94.      more than one member.
  95.      If no modifiers are used with `m', any members you name in the
  96.      FILE arguments are moved to the *end* of the archive; you can use
  97.      the `a', `b', or `i' modifiers to move them to a specified place
  98.      instead.
  99.      *Print* the specified members of the archive, to the standard
  100.      output file.  If the `v' modifier is specified, show the member
  101.      name before copying its contents to standard output.
  102.      If you specify no FILE arguments, all the files in the archive are
  103.      printed.
  104.      *Quick append*; add the files FILE... to the end of ARCHIVE,
  105.      without checking for replacement.
  106.      The modifiers `a', `b', and `i' do *not* affect this operation;
  107.      new members are always placed at the end of the archive.
  108.      The modifier `v' makes `ar' list each file as it is appended.
  109.      Since the point of this operation is speed, the archive's symbol
  110.      table index is not updated, even if it already existed; you can
  111.      use `ar s' or `ranlib' explicitly to update the symbol table index.
  112.      Insert the files FILE... into ARCHIVE (with *replacement*). This
  113.      operation differs from `q' in that any previously existing members
  114.      are deleted if their names match those being added.
  115.      If one of the files named in FILE... doesn't exist, `ar' displays
  116.      an error message, and leaves undisturbed any existing members of
  117.      the archive matching that name.
  118.      By default, new members are added at the end of the file; but you
  119.      may use one of the modifiers `a', `b', or `i' to request placement
  120.      relative to some existing member.
  121.      The modifier `v' used with this operation elicits a line of output
  122.      for each file inserted, along with one of the letters `a' or `r'
  123.      to indicate whether the file was appended (no old member deleted)
  124.      or replaced.
  125.      Display a *table* listing the contents of ARCHIVE, or those of the
  126.      files listed in FILE... that are present in the archive.  Normally
  127.      only the member name is shown; if you also want to see the modes
  128.      (permissions), timestamp, owner, group, and size, you can request
  129.      that by also specifying the `v' modifier.
  130.      If you do not specify a FILE, all files in the archive are listed.
  131.      If there is more than one file with the same name (say, `fie') in
  132.      an archive (say `b.a'), `ar t b.a fie' lists only the first
  133.      instance; to see them all, you must ask for a complete listing--in
  134.      our example, `ar t b.a'.
  135.      *Extract* members (named FILE) from the archive.  You can use the
  136.      `v' modifier with this operation, to request that `ar' list each
  137.      name as it extracts it.
  138.      If you do not specify a FILE, all files in the archive are
  139.      extracted.
  140.    A number of modifiers (MOD) may immediately follow the P keyletter,
  141. to specify variations on an operation's behavior:
  142.      Add new files *after* an existing member of the archive.  If you
  143.      use the modifier `a', the name of an existing archive member must
  144.      be present as the MEMBERNAME argument, before the ARCHIVE
  145.      specification.
  146.      Add new files *before* an existing member of the archive.  If you
  147.      use the modifier `b', the name of an existing archive member must
  148.      be present as the MEMBERNAME argument, before the ARCHIVE
  149.      specification.  (same as `i').
  150.      *Create* the archive.  The specified ARCHIVE is always created if
  151.      it didn't exist, when you request an update.  But a warning is
  152.      issued unless you specify in advance that you expect to create it,
  153.      by using this modifier.
  154.      Insert new files *before* an existing member of the archive.  If
  155.      you use the modifier `i', the name of an existing archive member
  156.      must be present as the MEMBERNAME argument, before the ARCHIVE
  157.      specification.  (same as `b').
  158.      This modifier is accepted but not used.
  159.      Preserve the *original* dates of members when extracting them.  If
  160.      you do not specify this modifier, files extracted from the archive
  161.      are stamped with the time of extraction.
  162.      Write an object-file index into the archive, or update an existing
  163.      one, even if no other change is made to the archive.  You may use
  164.      this modifier flag either with any operation, or alone.  Running
  165.      `ar s' on an archive is equivalent to running `ranlib' on it.
  166.      Normally, `ar r'... inserts all files listed into the archive.  If
  167.      you would like to insert *only* those of the files you list that
  168.      are newer than existing members of the same names, use this
  169.      modifier.  The `u' modifier is allowed only for the operation `r'
  170.      (replace).  In particular, the combination `qu' is not allowed,
  171.      since checking the timestamps would lose any speed advantage from
  172.      the operation `q'.
  173.      This modifier requests the *verbose* version of an operation.  Many
  174.      operations display additional information, such as filenames
  175.      processed, when the modifier `v' is appended.
  176.      This modifier shows the version number of `ar'.
  177. File: binutils.info,  Node: ar-scripts,  Prev: ar-cmdline,  Up: ar
  178. Controlling `ar' with a script
  179. ==============================
  180.      ar -M [ <SCRIPT ]
  181.    If you use the single command-line option `-M' with `ar', you can
  182. control its operation with a rudimentary command language.  This form
  183. of `ar' operates interactively if standard input is coming directly
  184. from a terminal.  During interactive use, `ar' prompts for input (the
  185. prompt is `AR >'), and continues executing even after errors.  If you
  186. redirect standard input to a script file, no prompts are issued, and
  187. `ar' abandons execution (with a nonzero exit code) on any error.
  188.    The `ar' command language is *not* designed to be equivalent to the
  189. command-line options; in fact, it provides somewhat less control over
  190. archives.  The only purpose of the command language is to ease the
  191. transition to GNU `ar' for developers who already have scripts written
  192. for the MRI "librarian" program.
  193.    The syntax for the `ar' command language is straightforward:
  194.    * commands are recognized in upper or lower case; for example, `LIST'
  195.      is the same as `list'.  In the following descriptions, commands are
  196.      shown in upper case for clarity.
  197.    * a single command may appear on each line; it is the first word on
  198.      the line.
  199.    * empty lines are allowed, and have no effect.
  200.    * comments are allowed; text after either of the characters `*' or
  201.      `;' is ignored.
  202.    * Whenever you use a list of names as part of the argument to an `ar'
  203.      command, you can separate the individual names with either commas
  204.      or blanks.  Commas are shown in the explanations below, for
  205.      clarity.
  206.    * `+' is used as a line continuation character; if `+' appears at
  207.      the end of a line, the text on the following line is considered
  208.      part of the current command.
  209.    Here are the commands you can use in `ar' scripts, or when using
  210. `ar' interactively.  Three of them have special significance:
  211.    `OPEN' or `CREATE' specify a "current archive", which is a temporary
  212. file required for most of the other commands.
  213.    `SAVE' commits the changes so far specified by the script.  Prior to
  214. `SAVE', commands affect only the temporary copy of the current archive.
  215. `ADDLIB ARCHIVE'
  216. `ADDLIB ARCHIVE (MODULE, MODULE, ... MODULE)'
  217.      Add all the contents of ARCHIVE (or, if specified, each named
  218.      MODULE from ARCHIVE) to the current archive.
  219.      Requires prior use of `OPEN' or `CREATE'.
  220. `ADDMOD FILE, FILE, ... FILE'
  221.      Add each named FILE as a module in the current archive.
  222.      Requires prior use of `OPEN' or `CREATE'.
  223. `CLEAR'
  224.      Discard the contents of the current archive, cancelling the effect
  225.      of any operations since the last `SAVE'.  May be executed (with no
  226.      effect) even if  no current archive is specified.
  227. `CREATE ARCHIVE'
  228.      Creates an archive, and makes it the current archive (required for
  229.      many other commands).  The new archive is created with a temporary
  230.      name; it is not actually saved as ARCHIVE until you use `SAVE'.
  231.      You can overwrite existing archives; similarly, the contents of any
  232.      existing file named ARCHIVE will not be destroyed until `SAVE'.
  233. `DELETE MODULE, MODULE, ... MODULE'
  234.      Delete each listed MODULE from the current archive; equivalent to
  235.      `ar -d ARCHIVE MODULE ... MODULE'.
  236.      Requires prior use of `OPEN' or `CREATE'.
  237. `DIRECTORY ARCHIVE (MODULE, ... MODULE)'
  238. `DIRECTORY ARCHIVE (MODULE, ... MODULE) OUTPUTFILE'
  239.      List each named MODULE present in ARCHIVE.  The separate command
  240.      `VERBOSE' specifies the form of the output: when verbose output is
  241.      off, output is like that of `ar -t ARCHIVE MODULE...'.  When
  242.      verbose output is on, the listing is like `ar -tv ARCHIVE
  243.      MODULE...'.
  244.      Output normally goes to the standard output stream; however, if you
  245.      specify OUTPUTFILE as a final argument, `ar' directs the output to
  246.      that file.
  247. `END'
  248.      Exit from `ar', with a `0' exit code to indicate successful
  249.      completion.  This command does not save the output file; if you
  250.      have changed the current archive since the last `SAVE' command,
  251.      those changes are lost.
  252. `EXTRACT MODULE, MODULE, ... MODULE'
  253.      Extract each named MODULE from the current archive, writing them
  254.      into the current directory as separate files.  Equivalent to `ar -x
  255.      ARCHIVE MODULE...'.
  256.      Requires prior use of `OPEN' or `CREATE'.
  257. `LIST'
  258.      Display full contents of the current archive, in "verbose" style
  259.      regardless of the state of `VERBOSE'.  The effect is like `ar tv
  260.      ARCHIVE').  (This single command is a GNU `ld' enhancement, rather
  261.      than present for MRI compatibility.)
  262.      Requires prior use of `OPEN' or `CREATE'.
  263. `OPEN ARCHIVE'
  264.      Opens an existing archive for use as the current archive (required
  265.      for many other commands).  Any changes as the result of subsequent
  266.      commands will not actually affect ARCHIVE until you next use
  267.      `SAVE'.
  268. `REPLACE MODULE, MODULE, ... MODULE'
  269.      In the current archive, replace each existing MODULE (named in the
  270.      `REPLACE' arguments) from files in the current working directory.
  271.      To execute this command without errors, both the file, and the
  272.      module in the current archive, must exist.
  273.      Requires prior use of `OPEN' or `CREATE'.
  274. `VERBOSE'
  275.      Toggle an internal flag governing the output from `DIRECTORY'.
  276.      When the flag is on, `DIRECTORY' output matches output from `ar
  277.      -tv '....
  278. `SAVE'
  279.      Commit your changes to the current archive, and actually save it
  280.      as a file with the name specified in the last `CREATE' or `OPEN'
  281.      command.
  282.      Requires prior use of `OPEN' or `CREATE'.
  283. File: binutils.info,  Node: objcopy,  Next: nm,  Prev: ar,  Up: Top
  284. objcopy
  285. *******
  286.      objcopy [ -F FORMAT | --format=FORMAT ]
  287.              [ -I FORMAT | --input-format=FORMAT ]
  288.              [ -O FORMAT | --output-format=FORMAT ]
  289.              [ -S | --strip-all ]  [ -g | --strip-debug ]
  290.              [ -x | --discard-all ]  [ -X | --discard-locals ]
  291.              [ -v | --verbose ]  [ -V | --version ]
  292.              INFILE [OUTFILE]
  293.    The GNU `objcopy' utility copies the contents of an object file to
  294. another.  `objcopy' uses the GNU BFD Library to read and write the
  295. object files.  It can write the destination object file in a format
  296. different from that of the source object file.  The exact behavior of
  297. `objcopy' is controlled by command-line options.
  298.    `objcopy' creates temporary files to do its translations and deletes
  299. them afterward.  `objcopy' uses BFD to do all its translation work; it
  300. knows about all the formats BFD knows about, and thus is able to
  301. recognize most formats without being told explicitly.  *Note BFD:
  302. (ld.info)BFD the GNU linker.
  303. `INFILE'
  304. `OUTFILE'
  305.      The source and output files respectively.  If you do not specify
  306.      OUTFILE, `objcopy' creates a temporary file and destructively
  307.      renames the result with the name of the input file.
  308. `-I FORMAT'
  309. `--input-format=FORMAT'
  310.      Consider the source file's object format to be FORMAT, rather than
  311.      attempting to deduce it.
  312. `-O FORMAT'
  313. `--output-format=FORMAT'
  314.      Write the output file using the object format FORMAT.
  315. `-F FORMAT'
  316. `--format=FORMAT'
  317.      Use FORMAT as the object format for both the input and the output
  318.      file; i.e. simply transfer data from source to destination with no
  319.      translation.
  320. `--strip-all'
  321.      Do not copy relocation and symbol information from the source file.
  322. `--strip-debug'
  323.      Do not copy debugging symbols from the source file.
  324. `--discard-all'
  325.      Do not copy non-global symbols from the source file.
  326. `--discard-locals'
  327.      Do not copy compiler-generated local symbols.  (These usually
  328.      start with `L' or `.'.)
  329. `--version'
  330.      Show the version number of `objcopy'.
  331. `--verbose'
  332.      Verbose output: list all object files modified.  In the case of
  333.      archives, `objcopy -V' lists all members of the archive.
  334. File: binutils.info,  Node: nm,  Next: objdump,  Prev: objcopy,  Up: Top
  335.      nm [ -a | --debug-syms ]  [ -g | --extern-only ]
  336.         [ -s | --print-armap ]  [ -o | --print-file-name ]
  337.         [ -n | --numeric-sort ]  [ -p | --no-sort ]
  338.         [ -r | --reverse-sort ]  [ -u | --undefined-only ]
  339.         [ --target=BFDNAME ]
  340.         [ OBJFILE... ]
  341.    GNU `nm' lists the symbols from object files OBJFILE....
  342.    The long and short forms of options, shown here as alternatives, are
  343. equivalent.
  344. `OBJFILE...'
  345.      Object files whose symbols are to be listed.  If no object files
  346.      are listed as arguments, `nm' assumes `a.out'.
  347. `--debug-syms'
  348.      Display debugger-only symbols; normally these are not listed.
  349. `--extern-only'
  350.      Display only external symbols.
  351. `--no-sort'
  352.      Don't bother to sort the symbols in any order; just print them in
  353.      the order encountered.
  354. `--numeric-sort'
  355.      Sort symbols numerically by their addresses, rather than
  356.      alphabetically by their names.
  357. `--print-armap'
  358.      When listing symbols from archive members, include the index: a
  359.      mapping (stored in the archive by `ar' or `ranlib') of which
  360.      modules contain definitions for which names.
  361. `--print-file-name'
  362.      Precede each symbol by the name of the input file where it was
  363.      found, rather than identifying the input file once only before all
  364.      of its symbols.
  365. `--reverse-sort'
  366.      Reverse the order of the sort (whether numeric or alphabetic); let
  367.      the last come first.
  368. `--target=BFDNAME'
  369.      Specify an object code format other than your system's default
  370.      format.  *Note objdump::, for information on listing available
  371.      formats.
  372. `--undefined-only'
  373.      Display only undefined symbols (those external to each object
  374.      file).
  375. File: binutils.info,  Node: objdump,  Next: ranlib,  Prev: nm,  Up: Top
  376. objdump
  377. *******
  378.      objdump [ -a ]  [ -b BFDNAME ]  [ -d ]  [ -f ]
  379.              [ -h | --header ]  [ -i ]  [ -j SECTION ]  [ -l ]
  380.              [ -m MACHINE ]  [ -r | --reloc ]  [ -s ]
  381.              [ --stabs ]  [ -t | --syms ]  [ -x ]
  382.              OBJFILE...
  383.    `objdump' displays information about one or more object files.  The
  384. options control what particular information to display.  This
  385. information is mostly useful to programmers who are working on the
  386. compilation tools, as opposed to programmers who just want their
  387. program to compile and work.
  388.    The long and short forms of options, shown here as alternatives, are
  389. equivalent.
  390. `OBJFILE...'
  391.      The object files to be examined.  When you specify archives,
  392.      `objdump' shows information on each of the member object files.
  393.      If any of the OBJFILE files are archives, display the archive
  394.      header information (in a format similar to `ls -l').  Besides the
  395.      information you could list with `ar tv', `objdump -a' shows the
  396.      object file format of each archive member.
  397. `-b BFDNAME'
  398.      Specify that the object-code format for the object files is
  399.      BFDNAME.  This option may not be necessary; OBJDUMP can
  400.      automatically recognize many formats.
  401.      For example,
  402.           objdump -b oasys -m vax -h fu.o
  403.      displays summary information from the section headers (`-h') of
  404.      `fu.o', which is explicitly identified (`-m') as a VAX object file
  405.      in the format produced by Oasys compilers.  You can list the
  406.      formats available with the `-i' option.
  407.      Disassemble.  Display the assembler mnemonics for the machine
  408.      instructions from OBJFILE.
  409.      File header.  Display summary information from the overall header
  410.      of each of the OBJFILE files.
  411. `--header'
  412.      Header.  Display summary information from the section headers of
  413.      the object file.
  414.      Display a list showing all architectures and object formats
  415.      available for specification with `-b' or `-m'.
  416. `-j NAME'
  417.      Display information only for section NAME.
  418.      Label the display (using debugging information) with the source
  419.      filename and line numbers corresponding to the object code shown.
  420. `-m MACHINE'
  421.      Specify that the object files OBJFILE are for architecture
  422.      MACHINE.  You can list available architectures using the `-i'
  423.      option.
  424. `--reloc'
  425.      Relocation.  Print the relocation entries of the file.
  426.      Display the full contents of any sections requested.
  427. `--stabs'
  428.      Display the full contents of any sections requested.  Display the
  429.      contents of the .stab and .stab.index and .stab.excl sections from
  430.      an ELF file.  This is only useful on systems (such as Solaris 2.0)
  431.      in which `.stab' debugging symbol-table entries are carried in an
  432.      ELF section.  In most other file formats, debugging symbol-table
  433.      entries are interleaved with linkage symbols, and are visible in
  434.      the `--syms' output.
  435. `--syms'
  436.      Symbol Table.  Print the symbol table entries of the file.  This
  437.      is similar to the information provided by the `nm' program.
  438.      Display all available header information, including the symbol
  439.      table and relocation entries.  Using `-x' is equivalent to
  440.      specifying all of `-a -f -h -r -t'.
  441. File: binutils.info,  Node: ranlib,  Next: size,  Prev: objdump,  Up: Top
  442. ranlib
  443. ******
  444.      ranlib [-vV] ARCHIVE
  445.    `ranlib' generates an index to the contents of an archive and stores
  446. it in the archive.  The index lists each symbol defined by a member of
  447. an archive that is a relocatable object file.
  448.    You may use `nm -s' or `nm --print-armap' to list this index.
  449.    An archive with such an index speeds up linking to the library and
  450. allows routines in the library to call each other without regard to
  451. their placement in the archive.
  452.    The GNU `ranlib' program is another form of GNU `ar'; running
  453. `ranlib' is completely equivalent to executing `ar -s'.  *Note ar::.
  454.      Show the version number of `ranlib'.
  455. File: binutils.info,  Node: size,  Next: strip,  Prev: ranlib,  Up: Top
  456.      size [ -A | -B | --format=COMPATIBILITY ]
  457.           [ --help ]  [ -d | -o | -x | --radix=NUMBER ]
  458.           [ --target=BFDNAME ]  [ -V | --version ]
  459.           OBJFILE...
  460.    The GNU `size' utility lists the section sizes--and the total
  461. size--for each of the object or archive files OBJFILE in its argument
  462. list.  By default, one line of output is generated for each object file
  463. or each module in an archive.
  464.    The command line options have the following meanings:
  465. `OBJFILE...'
  466.      The object files to be examined.
  467. `--format=COMPATIBILITY'
  468.      Using one of these options, you can choose whether the output from
  469.      GNU `size' resembles output from System V `size' (using `-A', or
  470.      `--format=sysv'), or Berkeley `size' (using `-B', or
  471.      `--format=berkeley').  The default is the one-line format similar
  472.      to Berkeley's.
  473.      Here is an example of the Berkeley (default) format of output from
  474.      `size':
  475.           size --format Berkeley ranlib size
  476.           text    data    bss     dec     hex     filename
  477.           294880  81920   11592   388392  5ed28   ranlib
  478.           294880  81920   11888   388688  5ee50   size
  479.      This is the same data, but displayed closer to System V
  480.      conventions:
  481.           size --format SysV ranlib size
  482.           ranlib  :
  483.           section         size         addr
  484.           .text         294880         8192
  485.           .data          81920       303104
  486.           .bss           11592       385024
  487.           Total         388392
  488.           
  489.           
  490.           size  :
  491.           section         size         addr
  492.           .text         294880         8192
  493.           .data          81920       303104
  494.           .bss           11888       385024
  495.           Total         388688
  496. `--help'
  497.      Show a summary of acceptable arguments and options.
  498. `--radix=NUMBER'
  499.      Using one of these options, you can control whether the size of
  500.      each section is given in decimal (`-d', or `--radix=10'); octal
  501.      (`-o', or `--radix=8'); or hexadecimal (`-x', or `--radix=16').
  502.      In `--radix=NUMBER', only the three values (8, 10, 16) are
  503.      supported.  The total size is always given in two radices; decimal
  504.      and hexadecimal for `-d' or `-x' output, or octal and hexadecimal
  505.      if you're using `-o'.
  506. `--target=BFDNAME'
  507.      Specify that the object-code format for OBJFILE is BFDNAME.  This
  508.      option may not be necessary; `size' can automatically recognize
  509.      many formats.  *Note objdump::, for information on listing
  510.      available formats.
  511. `--version'
  512.      Display the version number of `size'.
  513. File: binutils.info,  Node: strip,  Next: cppfilt,  Prev: size,  Up: Top
  514. strip
  515. *****
  516.      strip [ -F FORMAT | --format=FORMAT | --target=FORMAT ]
  517.            [ -I FORMAT | --input-format=FORMAT ]
  518.            [ -O FORMAT | --output-format=FORMAT ]
  519.            [ -s | --strip-all ] [ -S | -g | --strip-debug ]
  520.            [ -x | --discard-all ] [ -X | --discard-locals ]
  521.            [ -v | --verbose ]  [ -V | --version ]
  522.            OBJFILE...
  523.    GNU `strip' discards all symbols from object files OBJFILE.  The
  524. list of object files may include archives.
  525.    `strip' will not execute unless at least one object file is listed.
  526.    `strip' modifies the files named in its argument, rather than
  527. writing modified copies under different names.
  528. `-I FORMAT'
  529. `--input-format=FORMAT'
  530.      Treat the original OBJFILE as a file with the object code format
  531.      FORMAT.
  532. `-O FORMAT'
  533. `--output-format=FORMAT'
  534.      Replace OBJFILE with a file in the output format FORMAT.
  535. `-F FORMAT'
  536. `--format=FORMAT'
  537. `--target=FORMAT'
  538.      Treat the original OBJFILE as a file with the object code format
  539.      FORMAT, and rewrite it in the same format.
  540. `--strip-all'
  541.      Remove all symbols.
  542. `--strip-debug'
  543.      Remove debugging symbols only.
  544. `--discard-all'
  545.      Remove non-global symbols.
  546. `--discard-locals'
  547.      Remove compiler-generated local symbols.  (These usually start
  548.      with `L' or `.'.)
  549. `--version'
  550.      Show the version number for `strip'.
  551. `--verbose'
  552.      Verbose output: list all object files modified.  In the case of
  553.      archives, `strip -v' lists all members of the archive.
  554. File: binutils.info,  Node: cppfilt,  Next: Index,  Prev: strip,  Up: Top
  555. cppfilt
  556. *******
  557.    The C++ language provides function overloading, which means that you
  558. can write many function with the same name (but taking different kinds
  559. of parameters).  So that the linker can keep these overloaded functions
  560. from clashing, all C++ function names are encoded ("mangled") into a
  561. funny-looking low-level assembly label.  The `cppfilt' program does the
  562. inverse mapping:  It decodes ("demangles") low-level names into
  563. user-level names.
  564.    When you use `cppfilt' as a filter (which is usually the case), it
  565. reads from standard input.  Every alphanumeric word (consisting of
  566. letters, digits, underscores, dollars, or periods) seen in the input is
  567. a potential label.  If the label decodes into a C++ name.  the C++ name
  568. will replace the low-level name in the output.
  569.    A typical use of `cppfilt' is to pipe the output of `nm' though it.
  570.    Note that on some systems, both the C and C++ compilers put an
  571. underscore in front of every name.  (I.e. the C name `foo' gets the
  572. low-level name `_foo'.)  On such systems, `cppfilt' removes any initial
  573. underscore of a potential label.
  574. File: binutils.info,  Node: Index,  Prev: cppfilt,  Up: Top
  575. Index
  576. *****
  577. * Menu:
  578. * .stab:                                objdump.
  579. * ar compatibility:                     ar.
  580. * a.out:                                nm.
  581. * all header information, object file:  objdump.
  582. * ar:                                   ar.
  583. * architecture:                         objdump.
  584. * architectures available:              objdump.
  585. * archive contents:                     ranlib.
  586. * archive headers:                      objdump.
  587. * archives:                             ar.
  588. * collections of files:                 ar.
  589. * compatibility, ar:                    ar.
  590. * contents of archive:                  ar-cmdline.
  591. * cppfilt:                              cppfilt.
  592. * creating archives:                    ar-cmdline.
  593. * dates in archive:                     ar-cmdline.
  594. * debug symbols:                        objdump.
  595. * debugging symbols:                    nm.
  596. * deleting from archive:                ar-cmdline.
  597. * demangling C++ symbols:               cppfilt.
  598. * disassembling object code:            objdump.
  599. * discarding symbols:                   strip.
  600. * ELF object file format:               objdump.
  601. * external symbols:                     nm.
  602. * external symbols:                     nm.
  603. * extract from archive:                 ar-cmdline.
  604. * file name:                            nm.
  605. * header information, all:              objdump.
  606. * input file name:                      nm.
  607. * libraries:                            ar.
  608. * machine instructions:                 objdump.
  609. * moving in archive:                    ar-cmdline.
  610. * MRI compatibility, ar:                ar-scripts.
  611. * name duplication in archive:          ar-cmdline.
  612. * name length:                          ar.
  613. * nm:                                   nm.
  614. * objdump:                              objdump.
  615. * object code format:                   size.
  616. * object code format:                   objdump.
  617. * object code format:                   nm.
  618. * object file header:                   objdump.
  619. * object file information:              objdump.
  620. * object file sections:                 objdump.
  621. * object formats available:             objdump.
  622. * operations on archive:                ar-cmdline.
  623. * printing from archive:                ar-cmdline.
  624. * quick append to archive:              ar-cmdline.
  625. * radix for section sizes:              size.
  626. * ranlib:                               ranlib.
  627. * relative placement in archive:        ar-cmdline.
  628. * relocation entries, in object file:   objdump.
  629. * removing symbols:                     strip.
  630. * repeated names in archive:            ar-cmdline.
  631. * replacement in archive:               ar-cmdline.
  632. * scripts, ar:                          ar-scripts.
  633. * section headers:                      objdump.
  634. * section information:                  objdump.
  635. * section sizes:                        size.
  636. * sections, full contents:              objdump.
  637. * size:                                 size.
  638. * size display format:                  size.
  639. * size number format:                   size.
  640. * sorting symbols:                      nm.
  641. * source file name:                     nm.
  642. * source filenames for object files:    objdump.
  643. * stab:                                 objdump.
  644. * strip:                                strip.
  645. * symbol index:                         ranlib.
  646. * symbol index:                         ar.
  647. * symbol index, listing:                nm.
  648. * symbol table entries, printing:       objdump.
  649. * symbols:                              nm.
  650. * symbols, discarding:                  strip.
  651. * undefined symbols:                    nm.
  652. * Unix compatibility, ar:               ar-cmdline.
  653. * updating an archive:                  ar-cmdline.
  654. * version:                              Top.
  655. * writing archive index:                ar-cmdline.
  656. Tag Table:
  657. Node: Top
  658. Node: ar
  659. Node: ar-cmdline
  660. Node: ar-scripts
  661. 10275
  662. Node: objcopy
  663. 15948
  664. Node: nm
  665. 18242
  666. Node: objdump
  667. 20057
  668. Node: ranlib
  669. 23424
  670. Node: size
  671. 24158
  672. Node: strip
  673. 26842
  674. Node: cppfilt
  675. 28453
  676. Node: Index
  677. 29627
  678. End Tag Table
  679.